package routers

import (
	"MBTIx/handlers"

	"github.com/gin-gonic/gin"
)

func Student_router(server *gin.Engine,auth gin.HandlerFunc) {
	server.POST("/student", auth,handlers.Post_student) //接受请求，调用相应的处理器
	server.GET("/students",auth,handlers.Get_allStudent)
	server.GET("/students/:id", auth,handlers.Get_classStu)
	server.POST("/students/:id", auth,handlers.Get_percenttage)
	server.PUT("/student", auth,handlers.Update_student)
	server.DELETE("/student", auth,handlers.Delete_student)
	server.GET("/student/:id",auth,handlers.Get_student)
}
